<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="../../css/weui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/jquery-weui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/index.css" />
    <link rel="stylesheet" type="text/css" href="../../css/order.css" />
    <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_546019_o8qxm6fupb0ggb9.css" />
    <title>新增订单</title>
    <script src="../../js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/jquery-weui.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/baseConfig.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>
    <!--<div id="header">
			<div class="header-title" style="position: fixed;top: 0;">
				<img src="../../img/left.png" class="left" />
				<span>新增订单</span>
			</div>
		</div>-->
    <div class="addNeworder" style="margin-top: 0;">
        <div class="addNeworder-top">
            <p class="p1">
                <span>运输方式</span>
                <span><i class="iconfont icon-duigouzhong active" data-check="0"></i>到厂</span>
                <span><i class="iconfont icon-duigouzhong" data-check="1"></i>自提</span>
            </p>
            <p class="p2">
                <span>是否含税</span>
                <span><i class="iconfont icon-duigouzhong active" data-check="10"></i>含税</span>
                <span><i class="iconfont icon-duigouzhong" data-check="20"></i>未税</span>
            </p>
            <p style="border-bottom: 0;">备注：</p>
            <textarea name="" rows="" cols="" class="remarks"></textarea>
        </div>

        <div class="material-list">

            <div class="demos-content-padded">
                <a href="javascript:;" class="weui-btn weui-btn_mini weui-btn_default" style="float: left;">取消</a>
                <a href="javascript:;" class="weui-btn weui-btn_mini weui-btn_primary" style="float: right;margin-top: 0;background: #28c81e;">下一步</a>
            </div>
        </div>
    </div>
    <div class="weui-gallery" style="display: none">
        <span class="weui-gallery__img"></span>
    </div>
</body>
<script type="text/javascript">
    $(document).ready(function() {
        baseConfig.historyBack()
        $(".addNeworder-top p span").find("i").on("click", function() {
            if ($(this).attr("class") == "iconfont icon-duigouzhong") {
                $(this).addClass("active").parent().siblings().find("i").removeClass("active")
            }
        })
        $(".weui-btn_default").on("click", function() {
            location.href = "orderList.html"
                //				history.back()
        })
        $(".weui-btn_primary").on("click", function() {
            for (var i = 0; i < $(".p1 i").length; i++) {
                if ($(".p1 i").eq(i).hasClass("active")) {
                    var tranType = $(".p1 i").eq(i).attr("data-check")
                }
                if ($(".p2 i").eq(i).hasClass("active")) {
                    var isHanShui = $(".p2 i").eq(i).attr("data-check")
                }
            }
            // $.ajax({
            // 	type: "get",
            // 	url: baseConfig.localHttp2+"api/order/addOrEditOrder",
            // 	async: false,
            // 	headers: {
            // 		'Content-Type': 'application/x-www-form-urlencoded',
            // 	},
            // 	data: {
            // 		isHanShui:isHanShui,
            // 		clientId:baseConfig.login(),
            // 		tranType:tranType,
            // 		phone:baseConfig.GetQueryString("tel"),
            // 		remarks:$(".remarks").val()
            // 	},
            // 	success: function(data) {
            // 		console.log(data)
            // 		location.href = "materialList.html?orderNo="+data.content.orderNo+"&orderid="+data.content.id+"&type="+baseConfig.GetQueryString("type")
            // 	},
            // 	error:function(){

            // 	}
            // })	
            //				location.href = "materialList.html"
        })

    })
</script>

</html>